﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ComprehensiveSystem.Configuration.Configuration;
using SqlSugar.Extensions;

namespace ComprehensiveSystem.Configuration
{
    /// <summary>
    /// 配置文件格式化
    /// </summary>
    public class AppSettingsConstVars
    {

        #region 全局地址================================================================================

        #endregion

        #region redis================================================================================

        /// <summary>
        /// 获取redis连接字符串
        /// </summary>
        public static readonly string RedisConfigConnectionString = AppSettingsHelper.GetContent("RedisConfig", "ConnectionString");

        /// <summary>
        /// 启用redis作为缓存选择
        /// </summary>
        public static readonly bool RedisUseCache = AppSettingsHelper.GetContent("RedisConfig", "UseCache").ObjToBool();
        /// <summary>
        /// 启用redis作为定时任务
        /// </summary>
        public static readonly bool RedisUseTimedTask = AppSettingsHelper.GetContent("RedisConfig", "UseTimedTask").ObjToBool();

        #endregion

        #region 数据库================================================================================
        /// <summary>
        /// 获取数据库连接字符串
        /// </summary>
        public static readonly string DbSqlConnection = AppSettingsHelper.GetContent("ConnectionStrings", "SqlConnection");
        public static readonly string Base_Sap_Daily_ZY_NEW = AppSettingsHelper.GetContent("ConnectionStrings", "Base_Sap_Daily_ZY_NEW");

        public static readonly string Base_Sap_Patient_ZY_NEW = AppSettingsHelper.GetContent("ConnectionStrings", "Base_Sap_Patient_ZY_NEW");
        public static readonly string BoGu_SAP = AppSettingsHelper.GetContent("ConnectionStrings", "BoGu_SAP");
        public static readonly string NanChang_Base_Team_ZY_NEW = AppSettingsHelper.GetContent("ConnectionStrings", "NanChang_Base_Team_ZY_NEW");
        /// <summary>
        /// 获取数据库类型
        /// </summary>
        public static readonly string DbDbType = AppSettingsHelper.GetContent("ConnectionStrings", "DbType");
        #endregion
    }
}
